<?php
class Application_Model_Schema_Action {
	protected $_id;
	protected $_hid;
	protected $_name;
	protected $_executionTime;
	protected $_use;
	protected $_produce;

	public function __construct() {
		$this->_use			= new Application_Model_Schema_ActionValue();
		$this->_produce = new Application_Model_Schema_ActionValue();
	}

	public function __set($name, $value) {
		$method = 'set' . $name;
		if(!method_exists($this, $method)) {
			throw new Exception('Set Invalid Action Property');
		}
		$this->$method($value);
	}

	public function __get($name) {
		$method = 'get' . $name;
		if(!method_exists($this, $method)) {
			throw new Exception('Get Invalid Action Property');
		}
		return $this->$method();
	}

	public function setId($id) {
		$this->_id = (int) $id;
		return $this;
	}

	public function getId() {
		return $this->_id;
	}

	public function setHid($hid) {
		$this->_hid = (string) $hid;
		return $this;
	}

	public function getHid() {
		return $this->_hid;
	}

	public function setName($name) {
		$this->_name = (string) $name;
		return $this;
	}

	public function setExecutionTime($time) {
		if(isset($time)) {
			$time = (int) $time;
		}

		$this->_executionTime = $time;
		return $this;
	}

	public function getExecutionTime() {
		return $this->_executionTime;
	}

	public function getName() {
		return $this->_name;
	}

	public function setUse($use) {
		$this->_use = $use;
		return $this;
	}

	public function getUse() {
		return $this->_use;
	}

	public function setProduce($produce) {
		$this->_name = $produce;
		return $this;
	}

	public function getProduce() {
		return $this->_produce;
	}
}
?>